<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>一体机投诉1</title>
<script type="text/javascript" src="<s:url value='/resources/js/jquery/jquery-1.5.2.min.js'/>"></script>
<link rel="stylesheet" type="text/css" href="<s:url value='/resources/css/aio/aio_home.css'/>" media="all" />

<script type="text/javascript" src="<s:url value='/resources/js/aio/jquery.keypad.js'/>"></script>
<link rel="stylesheet" type="text/css" href="<s:url value='/resources/css/aio/jquery.keypad.css'/>" media="all" />
	
	<script type="text/javascript">
		$(function () {
			$('#defaultKeypad').keypad();
		});
		var contextpath = "<%= request.getContextPath() %>";
		function complaint(){
			var num = $("input[type='checkbox']").length;
			var flag = 0;
			for(var i=0;i<num;i++){
				if($("input[type='checkbox']").eq(i).attr("checked")){
					flag++;
				}
			}
			if(flag == 0){
				$("#select").css("display","block");
			}else{
				$("#plan_list").addClass("my_tipbox_model");
				$("#tel").css("display","block");
			}
		}
		function retu(v){
			$("#"+v).css("display","none");
		}
		function colseWin(v){
			$("#"+v).css("display","none");
			$("#plan_list").removeClass("my_tipbox_model");
		}
		function confirm(){
			var tel = $("#defaultKeypad").val();
			if(tel == ""){
				$("#tel_null").css("display","block");
			}else{
				$("#tel").css("display","none");
				$("#confirm").css("display","block");
			}
		}
		
		function submit(){
			$.ajax({
				url: contextpath+'/aio/complaint',
				data: $("#comForm").serialize(),
				type: 'POST',
				dataType: 'json',
				success: function(json){
					var data = eval("("+json.messageObj+")");
					if(data == 1){
						$("#confirm").css("display","none");
						$("#success").css("display","block");
					}
				},
				error: function(xhr, ajaxOptions, thrownError){
				}
			});
		}
	</script>
</head>

<body scroll="no">
	<div class="main">
    	<jsp:include page="/web/aio/aioheader.jsp"></jsp:include>
        <div class="q_left">
            <div class="comp">
            	<img src="<s:url value='/resources/images/aio/comp.png'/>" />
            </div>
            <div class="comp_rhome">
	            <a href="<s:url value='/aio/home?cardNo=%{#request.cardNo}' />">
	            	<img src="<s:url value='/resources/images/aio/rhome.png'/>"/>
	            </a>
            </div>
        </div>
        <div class="q_right">
        	<form  method="post" id="comForm">
	        	<div id="plan_list">
	        		<input type="hidden" value="<s:property value='#request.tourismPlan.id' />" name="complaint.planId"/>
	      			<input type="hidden" value="<s:property value='#request.cardNo' />" name="complaint.cardNo"/>
	        		<div class="c_head"><img src="<s:url value='/resources/images/aio/step.png'/>" /></div>
	        		<div class="plan_info">
	        			<span class="c_blod">行程单号：</span><span class="info_val"><s:property value='#request.tourismPlan.tourCode' /></span>&nbsp;&nbsp;
	        			<span class="c_blod">旅行社：</span><span class="info_val"><s:property value='#request.tourismPlan.tourName' /></span>&nbsp;&nbsp;
	        			<span class="c_blod">旅行团：</span><span class="info_val"><s:property value='#request.tourismPlan.tourNo' /></span>
	        		</div>
	            	
            		<div class="comp_guide">
	            		<s:iterator value="#request.glist" var="guide" status="gNum">
	                   		<div class="under_line">
	                    		<span>导游：</span><s:property value="#guide.name" />
	                    		<input type="hidden" name="comp.guideList[<s:property value='#gNum.index'/>].guideId" value="<s:property value="#guide.guideid" />"/>
	                   		</div>
	                   		<div class="iteam">
	                   			<input id="g1" type="checkbox" value="解说不清" name="comp.guideList[<s:property value='#gNum.index'/>].compType"/><span class="ts_xx"><label for="g1">解说不清</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="g2" type="checkbox" value="态度冷漠"  name="comp.guideList[<s:property value='#gNum.index'/>].compType"/><span class="ts_xx"><label for="g2">态度冷漠</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="g3" type="checkbox" value="解说不清"  name="comp.guideList[<s:property value='#gNum.index'/>].compType"/><span class="ts_xx"><label for="g3">服务不好</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
	                   		</div>
	                   	</s:iterator>
	            	</div>
	            	
	            	<div class="comp_scenic">
	            		<s:iterator value="#request.tlist" var="scenic" status="snum">
	                   		<div class="under_line">
	                   			<span>景区：</span><s:property value="#scenic.scenic" />
	                   			<input type="hidden" name="comp.scenicList[<s:property value='#snum.index'/>].scenicId" value="<s:property value="#scenic.scenicId" />"/>
	                   		</div>
	                   		<div class="iteam">
	                   			<input id="s<s:property value="#scenic.scenicId" />1" type="checkbox" value="时长不够" name="comp.scenicList[<s:property value='#snum.index'/>].compType"/><span class="ts_xx"><label for="s<s:property value="#scenic.scenicId" />1">时长不够</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="s<s:property value="#scenic.scenicId" />2" type="checkbox" value="景点不对" name="comp.scenicList[<s:property value='#snum.index'/>].compType"/><span class="ts_xx"><label for="s<s:property value="#scenic.scenicId" />2">景点不对</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="s<s:property value="#scenic.scenicId" />3" type="checkbox" value="不安全" name="comp.scenicList[<s:property value='#snum.index'/>].compType"/><span class="ts_xx"><label for="s<s:property value="#scenic.scenicId" />3">不安全</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
	                   		</div>
	                   	</s:iterator>
	            	</div>
	            	
	            	<div class="comp_shop">
	            		<s:iterator value="#request.slist" var="shop" status="shopNum">
	                   		<div class="under_line">
	                   			<span>购物：</span><s:property value="#shop.shopName" />
	                   			<input type="hidden" name="comp.shopList[<s:property value='#shopNum.index'/>].shopId" value="<s:property value="#shop.shopId" />"/>
	                   		</div>
	                   		<div class="iteam">
	                   			<input id="sh<s:property value="#shop.shopId" />1" type="checkbox" value="时长不够" name="comp.shopList[<s:property value='#shopNum.index'/>].compType"/><span class="ts_xx"><label for="sh<s:property value="#shop.shopId" />1">时长不够</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="sh<s:property value="#shop.shopId" />2" type="checkbox" value="宰客" name="comp.shopList[<s:property value='#shopNum.index'/>].compType"/><span class="ts_xx"><label for="sh<s:property value="#shop.shopId" />2">宰客</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="sh<s:property value="#shop.shopId" />3" type="checkbox" value="质量不好" name="comp.shopList[<s:property value='#shopNum.index'/>].compType"/><span class="ts_xx"><label for="sh<s:property value="#shop.shopId" />3">质量不好</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
	                   		</div>
	                   	</s:iterator>
	            	</div>
	            	
	            	<div class="comp_hotel">
	            		<s:iterator value="#request.hlist" var="hotel" status="hnum">
	                   		<div class="under_line">
	                   			<span>酒店：</span><s:property value="#hotel.hotelName" />
	                   			<input type="hidden" name="comp.hotelList[<s:property value='#hnum.index'/>].hotelId" value="<s:property value="#hotel.hotelId" />"/>
	                   		</div>
	                   		<div class="iteam">
	                   			<input id="ho<s:property value="#hotel.hotelId" />1" type="checkbox" value="环境不好" name="comp.hotelList[<s:property value='#hnum.index'/>].compType"/><span class="ts_xx"><label for="ho<s:property value="#hotel.hotelId" />1">环境不好</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="ho<s:property value="#hotel.hotelId" />2" type="checkbox" value="房间类型不符" name="comp.hotelList[<s:property value='#hnum.index'/>].compType"/><span class="ts_xx"><label for="ho<s:property value="#hotel.hotelId" />2">房间类型不符</label></span>&nbsp;&nbsp;&nbsp;
		                        <input id="ho<s:property value="#hotel.hotelId" />3"type="checkbox" value="不卫生" name="comp.hotelList[<s:property value='#hnum.index'/>].compType"/><span class="ts_xx"><label for="ho<s:property value="#hotel.hotelId" />3">不卫生</label></span>&nbsp;&nbsp;&nbsp;&nbsp;  
	                   		</div>
	                   	</s:iterator>
	            	</div>
	            	
	            	<div class="comp_food">
	            		<s:iterator value="#request.flist" var="food" status="fnum">
	                   		<div class="under_line">
	                   			<span>餐饮：</span><s:property value="#food.place" />
	                   			<input type="hidden" name="comp.foodList[<s:property value='#fnum.index'/>].foodId" value="<s:property value="#food.restid" />"/>
	                   		</div>
	                   		<div class="iteam">
	                   			<input id="fo<s:property value="#food.restid" />1" type="checkbox" value="不卫生" name="comp.foodList[<s:property value='#fnum.index'/>].compType"/><span class="ts_xx"><label for="fo<s:property value="#food.restid" />1">不卫生</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="fo<s:property value="#food.restid" />2" type="checkbox" value="量不足" name="comp.foodList[<s:property value='#fnum.index'/>].compType"/><span class="ts_xx"><label for="fo<s:property value="#food.restid" />2">量不足</label></span>&nbsp;&nbsp;&nbsp;
		                        <input id="fo<s:property value="#food.restid" />3" type="checkbox" value="服务不好" name="comp.foodlList[<s:property value='#fnum.index'/>].compType"/><span class="ts_xx"><label for="fo<s:property value="#food.restid" />3">服务不好</label></span>&nbsp;&nbsp;&nbsp;&nbsp;  
	                   		</div>
	                   	</s:iterator>
	            	</div>
	            	
	            	<div class="comp_car">
	            		<s:iterator value="#request.clist" var="car" status="cnum">
	                   		<div class="under_line">
	                   			<span>汽车：</span><s:property value="#car.company" />
	                   			<input type="hidden" name="comp.carList[<s:property value='#cnum.index'/>].carId" value="<s:property value="#car.id" />"/>
	                   		</div>
	                   		<div class="iteam">
	                   			<input id="ca<s:property value="#car.id" />1" type="checkbox" value="车辆不好" name="comp.carList[<s:property value='#cnum.index'/>].compType"/><span class="ts_xx"><label for="ca<s:property value="#car.id" />1">车辆不好</label></span>&nbsp;&nbsp;&nbsp;&nbsp;
		                        <input id="ca<s:property value="#car.id" />2" type="checkbox" value="车速过快" name="comp.carList[<s:property value='#cnum.index'/>].compType"/><span class="ts_xx"><label for="ca<s:property value="#car.id" />2">车速过快</label></span>&nbsp;&nbsp;&nbsp;
		                        <input id="ca<s:property value="#car.id" />3" type="checkbox" value="司机不准时" name="comp.carList[<s:property value='#cnum.index'/>].compType"/><span class="ts_xx"><label for="ca<s:property value="#car.id" />3">司机不准时</label></span>&nbsp;&nbsp;&nbsp;&nbsp;  
	                   		</div>
	                   	</s:iterator>
	            	</div>
	            </div>
	            
	            <div class="window" id="select">
            		<div class="tel_line">
	            		<span class="sel_title">选项不能为空</span>
            		</div>
            		<div class="sel_msg">请选择</div>
            		<a href="javascript:retu('select')">
            			<img src="<s:url value='/resources/images/aio/return2.png'/>" class="sel_cancel" />
            		</a>
            	</div>
	            
	            <div class="window" id="tel">
            		<div class="tel_line">
	            		<span class="red_flag">*</span>
	            		<span class="tel_title">联系电话：</span>
	            		<input type="text" name="complaint.phone" class="tel_in" id="defaultKeypad"/>
            		</div>
            		<div class="msg">(联系方式不能为空)</div>
            		<a href="javascript:confirm()">
            			<img src="<s:url value='/resources/images/aio/ok.png'/>" class="tel_ok" />
            		</a>
            		<a href="javascript:colseWin('tel')">
            			<img src="<s:url value='/resources/images/aio/cancel.png'/>" class="tel_cancel" />
            		</a>
            	</div>
            	
            	<div class="window" id="tel_null">
            		<div class="tel_line">
	            		<span class="sel_title">电话不能为空</span>
            		</div>
            		<div class="sel_msg">请填写</div>
            		<a href="javascript:retu('tel_null')">
            			<img src="<s:url value='/resources/images/aio/return2.png'/>" class="sel_cancel" />
            		</a>
            	</div>
            	
            	<div class="window" id="confirm">
            		<div class="con_msg">你是否确定投诉该行程？</div>
            		<a href="javascript:submit()">
            			<img src="<s:url value='/resources/images/aio/ok.png'/>" class="tel_ok" />
            		</a>
            		<a href="javascript:colseWin('confirm')">
            			<img src="<s:url value='/resources/images/aio/cancel.png'/>" class="tel_cancel" />
            		</a>
            	</div>
            	
            	<div class="window" id="success">
            		<div class="succ_msg"><img src="<s:url value='/resources/images/aio/success.png'/>" /></div>
            		<a href="<s:url value='/aio/pagerComplaint'/>?cardNo=<s:property value='#request.cardNo' />">
            			<img src="<s:url value='/resources/images/aio/ok.png'/>" class="succ_ok" />
            		</a>
            	</div>
            	
	             <div class="comp_r1">
	             	<a href="javascript:complaint()">
	             		<img src="<s:url value='/resources/images/aio/ts2.png'/>"/>
	             	</a>
	             	<a href="<s:url value='/aio/pagerComplaint?cardNo=%{#request.cardNo}' />">
	             		<img src="<s:url value='/resources/images/aio/return2.png'/>"/>
	             	</a>
	             </div>
            </form>
        </div>
        <div class="clr"></div>
        <div class="footer"><img src="<s:url value='/resources/images/aio/footer.png'/>" /></div>
    </div>
</body>
</html>
